var hhckParam={};
var dxcm="";
var ywy="";
var smrz_app = function(){
	function urlToIframe(){
		//获取参数
		ywy = manager.findParamFromUrl("ywy");
		//教育局
		var mc = manager.findParamFromUrl("dxmc");
		mc = "Education Bureau of XX City ";
		var smrzRactive = new Ractive({
			el : ".mainDiv",
			template : "#main-template",
			data : {
				"dxmc":mc
			},
			onrender : function(){
			},
			oncomplete : function(){
				
				$.ajax({
					url : Constants.epUrlPath + "jshz/getHzgxbList?ywy="+ywy,
					type : "GET",
					dataType : "json",
					contentType : "application/json",
					data:{},
					success : function(obj) {
						if(obj!=null&&obj!=Constants.NOLOGIN.CODE){
							if(obj.id==null||obj.id==""){
								alert("You are not a partner, please sign in first, sign an agreement!","Promp");
								return ;
								
							}else{
								if($("#content").hasClass("none")){
									$("#content").removeClass("none");
								}
								$.get("../../tpl/xysq.html", function(template) {
									smrzRactive.set("qyxycontent",template);
									
								});
								smrzRactive.set("hzfmc",obj.hzfmc);
								
							}
						}
					
					}
				});
				
			
	
				
				
			}
		});
		
		}
	
	//获取url参数
	function getUrlParam(name) {
		var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
		var r = window.location.search.substr(1).match(reg);
		if(r != null) return decodeURI(r[2]);
		return null;
	}
	return {
		init: function(){
			urlToIframe();
		}
	}
}()
$(document).ready(smrz_app.init);